<?php
/**
 * <pre>
 * <b>RUBIK IT Solution & Development ltd.</b>
 *
 * PROJECT		: Rubik Ultimate
 * COPYRIGHT	: 2008
 * ------------------------------------------------------
 * 
 * [GENERAL INFO OF THIS FILE] 
 * 
 * </pre>
 * 
 * Created on	:  Oct 25, 2008
 * 
 */
 
defined ( '_FW_EXEC' ) or die ( 'Restricted access' );
RCoreImporter::cls( "module.AbstractModule" );

class MenuModule extends AbstractModule {

	function isView() {
		$sysResrc = SysRequest::getResource ();
		return !($sysResrc->application == "users" && $sysResrc->action == "login");
	}
	
	function display() {
		$this->loadCSS('css/menu.css');
		 
		$this->loadJS('js/menu.js');
		
		// Should view menu?
		$xml = SysTemplate::getMenuInstance ( 'mainMenu' );
		$path = SYS_ADMIN_PATH . "modules" . DS . "menu" . DS . "mainMenu.menu.xml";
		$xml->loadFile ( $path );
		$xml->renderMenu ();
	}
}
?>